import Vue from 'vue'
import VueRouter from "vue-router";
import Article from '@/views/Article.vue'
import layout from '@/views/Layout.vue'
import collect from '@/views/Collect.vue'
import ArticleDetail from '@/views/ArticleDetail.vue'
import Like from '@/views/Like.vue'
import User from '@/views/User.vue'
Vue.use(VueRouter)

const router = new VueRouter({
  routes: [
    {path:'/detail/:id',component:ArticleDetail},
     
    { path:'/',component:layout,
      children:[
      {path:'/collect',component:collect},
      {path:'/article',component:Article},
      {path:'/like',component:Like},
      {path:'/user',component:User},
    ]},
  ],

})

export default router